diff options
Diffstat (limited to 'app/[lng]/partners/(partners)/info/page.tsx')
| -rw-r--r-- | app/[lng]/partners/(partners)/info/page.tsx | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/app/[lng]/partners/(partners)/info/page.tsx b/app/[lng]/partners/(partners)/info/page.tsx index 8215a451..cc1252e6 100644 --- a/app/[lng]/partners/(partners)/info/page.tsx +++ b/app/[lng]/partners/(partners)/info/page.tsx @@ -1,7 +1,10 @@ import { Suspense } from "react" import { Metadata } from "next" +import { getServerSession } from "next-auth/next" +import { authOptions } from "@/app/api/auth/[...nextauth]/route" import { JoinFormSkeleton } from "@/components/signup/join-form-skeleton" import { InfoForm } from "@/components/additional-info/join-form" +import { TechVendorInfoForm } from "@/components/additional-info/tech-vendor-info-form" // (Optional) If Next.js attempts to statically optimize this page and you need full runtime // behavior for query params, you may also need: @@ -12,10 +15,15 @@ export const metadata: Metadata = { description: "Authentication forms built using the components.", } -export default function IndexPage() { +export default async function IndexPage() { + const session = await getServerSession(authOptions) + + // 사용자의 techCompanyId가 있는지 확인 + const isTechVendor = session?.user?.techCompanyId + return ( <Suspense fallback={<JoinFormSkeleton/>}> - <InfoForm /> + {isTechVendor ? <TechVendorInfoForm /> : <InfoForm />} </Suspense> ) }
\ No newline at end of file |
